.bs-tabs{
  &.bs-tabs-left,
  &.bs-tabs-right{
    display: flex;
    .bs-tabs-header{
      flex: 0;
    }
    .bs-tabs-body{
      flex: auto;
      min-width: 0; /* 不加 min-width: 0; 的话会导致使用js计算宽度不正确问题 */
      min-height: 0;
    }
  }
  &.bs-tabs-right{
    .bs-tabs-header{
      order: 1;
    }
    .bs-tabs-body{
      order: 0;
    }
  }
  &.bs-tabs-bottom{
    display: flex;
    flex-direction: column;
    .bs-tabs-header{
      order: 1;
      min-width: 0; /* 不加 min-width: 0; 的话会导致使用js计算宽度不正确问题 */
      min-height: 0;
    }
    .bs-tabs-body{
      order: 0;
      flex: auto;
      min-width: 0; /* 不加 min-width: 0; 的话会导致使用js计算宽度不正确问题 */
      min-height: 0;
    }
  }
}

.bs-tabs-nav-wrapper{
  position: relative;
  &.has-scroll{
    padding-left: 1.375rem; // 22px
    padding-right: 1.375rem; // 22px
    &.trigger-type-more{
      padding-left: 0;
      padding-right: 2rem; // 32px
    }
    .bs-tabs-nav-prev,
    .bs-tabs-nav-next{
      display: block;
      line-height: 1;
      .bs-icon{
        vertical-align: middle;
      }
    }
    .bs-tabs-nav-operation{
      display: flex;
    }
  }
  &::after{
    position: absolute;
    bottom: 0;
    left: 0;
    content: ' ';
    width: 100%;
    height: 1px;
    background-color: #E4E7ED;
  }
}
.bs-tabs-nav-button,
.bs-tabs-nav-prev,
.bs-tabs-nav-next{
  display: block;
  outline: none;
  border: none;
  padding: 0;
  background-color: #fff;
  transition: all .3s;
  &:not([disabled]):hover{
    color: var(--primary);
  }
}
.bs-tabs-nav-prev,
.bs-tabs-nav-next{
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  color: #333;
  font-size: 0.875rem;
  &[disabled]{
    color: #aaa;
  }
}
.bs-tabs-nav-prev{
  padding-right: 0.25rem;
  left: 0;
}
.bs-tabs-nav-next{
  padding-left: 0.25rem;
  right: 0;
}
.bs-tabs-nav-operation{
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 0 .5rem;
  align-items: center;
  /*background-color: #ccc;*/
  .bs-dropdown{
    display: block;
  }
  .more-btn{
    display: block;
    line-height: 1;
    &::after{
      display: none;
    }
    .bs-icon{
      vertical-align: middle;
    }
  }
}
.bs-tabs-nav-scroller{
  display: flex;
  overflow: hidden;
  /*transform: translate(0);
  align-self: stretch;*/
}
.bs-tabs-nav{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  transition: transform .3s;
}
.bs-tabs-nav-item{
  display: inline-flex;
  padding: 0.5rem 0;
  margin: 0 1rem;
  list-style: none;
  color: #333;
  cursor: pointer;
  &:first-child{
    margin-left: 0;
  }
  &:nth-last-child(2){
    margin-right: 0;
  }
  &.is-disabled{
    color: #ccc;
    cursor: default;
    .bs-tabs-nav-close{
      &:hover{
        .bs-icon{
          color: currentColor;
          cursor: default;
          vertical-align: middle;
          background-color: #fff;
        }
      }
    }
  }
  &.is-active{
    color: var(--primary);
    .bs-tabs-nav-button{
      color: var(--primary);
    }
  }
}
.bs-tabs-nav-close{
  //line-height: 1;
  //margin-left: 0;
  //overflow: hidden;
  margin-left: .45rem;
  //transform: translateY(0.2rem);
  //font-size: 1.1em;
  transition: all .3s;
  font-size: 1rem;
  .bs-icon{
    vertical-align: middle;
    border-radius: 50%;
    transition: background-color .3s, color .2s;
    cursor: pointer;
  }
  &:hover{
    .bs-icon{
      color: #fff;
      background-color: #c0c4cc;
    }
  }
}
.bs-tabs-ink-bar{
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 3.125rem;
  transition: width .3s, left .3s, right .3s, top .3s, height .3s, transform .3s;
  pointer-events: none;
  background-color: var(--primary);
}
.bs-tabs-nav-button{
  width: 100%;
  color: #333;
  &[disabled]{
    color: #ccc;
  }
}


.bs-tabs-nav-wrapper{
  &.tab-position-left,
  &.tab-position-right{
    padding: 0;
    &.has-scroll{
      padding-left: 0;
      padding-right: 0;
      &.trigger-type-button{
        padding-top: 1.325rem;
        padding-bottom: 1.325rem;
      }
      &.trigger-type-more{
        padding-bottom: 1.5rem; // 24px
      }
    }
    &::after{
      left: auto;
      right: 0;
      height: 100%;
      width: 1px;
    }
    .bs-tabs-nav-prev{
      left: 0;
      right: 1px;
      top: 0;
      bottom: auto;
      .bs-icon{
        transform: rotate(90deg);
      }
    }
    .bs-tabs-nav-next{
      right: 1px;
      left: 0;
      top: auto;
      bottom: 0;
      .bs-icon{
        transform: rotate(90deg);
      }
    }
    .bs-tabs-nav-scroller{
      display: block;
    }
    .bs-tabs-nav{
      display: block;
    }
    .bs-tabs-nav-item{
      display: block;
      padding: 0.5rem 1.25rem;
      margin: 0;
      text-align: right;
    }
    .bs-tabs-nav-button{
      text-align: right;
    }
    .bs-tabs-ink-bar{
      top: 0;
      left: auto;
      right: 0;
      bottom: auto;
      width: 1px;
      height: 3.125rem;
    }
    .bs-tabs-nav-operation{
      top: auto;
      left: 0;
      right: 0;
      .bs-dropdown{
        flex: 1;
      }
      .more-btn{
        padding-right: 1.25rem;
        text-align: right;
      }
    }
  }
  &.tab-position-right{
    &::after{
      left: 0;
      right: auto;
    }
    .bs-tabs-nav-item{
      text-align: left;
    }
    .bs-tabs-nav-button{
      text-align: left;
    }
    .bs-tabs-ink-bar{
      left: 0;
      right: auto;
    }
    .bs-tabs-nav-operation{
      .more-btn{
        padding-left: 1.25rem;
        padding-right: 0;
        text-align: left;
      }
    }
  }
}
